<?php

namespace App\Http\Controllers\Backend;

use App\Type;

class TypesController extends BaseController
{
    public function __construct(Type $model)
    {
        $this->model = $model;
        $this->view = 'types';
        $this->title = 'Photo Types';
        $this->baseModel = Type::class;
    }

    public function validateStore($request)
    {
        $request->validate([
            'name' => 'required',
        ]);

        $data = $request->all();
        unset($data['display-name']);
        return $data;
    }
}
